Gaussian Elimination
Now that we know what an augmented matrix is and what it looks like, let's go deeper into
Elementary Row Operations
There are 3 main operations that can be performed on matrices
- Multiply any row by a non 0 constant.
- Add/Subtract a multiple of any row from any other row.
- Swap any two rows. Our main goal is to end up with a matrix like this:
Example 1. Eliminate the below matrix
132012−3−21∣∣∣−254
Lets start by performing two operations to eliminate x1 in rows 2 and 3.
- R2=R2−3×R1
- R3=R3−2×R1 The resulting matrix you end up with is:
Now in order to eliminate that x2 in row 3, change R3 to R3−2×R2
100010−37−7∣∣∣−211−14This form has achieved that initial goal and is called Echelon form or Row Echelon form, and the process to reach here is called Gaussian Elimination.
In fact, we can keep on reducing the matrix as follows. Let's continue by simplifying the R3=−71×R3 and you end up with:
100010−371∣∣∣−2112Then, modify R2=R2−7×R3
100010−301∣∣∣−2−32Finally, you modify R1 to R1=R1+3×R3
100010001∣∣∣4−32This resulting form is called the Reduced Echelon Form, and the process to get from row echelon form to reduced echelon form is called Gauss-Jordan Elimination.
The final solution set can be written as (x1,x2,x3)=(4,−3,2)
How to tell if a solution is inconsistent
Example 2. Evaluate if the below system is inconsistent or not
⎩⎨⎧−3y+6z=2x+4z=12x+y+6z=0
Let's write this as an adjacency matrix below:
012−301646∣∣∣210In order to make life easier, lets move R1 and R2 up one and R3 to the bottom so that we have our top diagonal as 1.
12001−3466∣∣∣102R2=R2−2×R1
10001−34−26∣∣∣1−22R3=R3+3×R2
1000104−20∣∣∣1−2−4That last row tells us 0x+0y+0z=−4 which does not make sense.
Echelon Form
Are Echelon forms unique?
No they are not.
−000∗000∗−00∗∗−0∗∗∗0∗∗∗0∣∗∣∗∣∗∣0Here − is any non 0 number and ∗ is any number. The variables associated with the pivot columns are called leading variables. The variables associated with the non pivot columns are called free variables.
Recall this example from the previous notes.
{2x1−x2+5x3−x4=−30x3+x4=−6putting that in adjacency matrix form
(20−1051−11∣∣−30−6)In the example above x1 and x3 are leading variables, and x2 and x4 are called free variables.
Example 3. Take the below matrix in row echelon form and convert it to reduced row echelon form.
1000−10004200−20100−400∣∣∣∣0250
Lets start with simplifying row 2. R2=21×R2
1000−10004100−20100−200∣∣∣∣0150R1=R1+2×R3
1000−1000410000100−200∣∣∣∣10150R1=R1−4×R2
1000−1000010000108−200∣∣∣∣6150This is now in reduced row echelon form. The system of equations that this augmented matrix gives is
⎩⎨⎧x1−x2+8x5=6x3−2x5=1x4=5Here the free variables are x2 and x5 and the leading variables are x1, x3 and x4. In order to arrive at the final solution, you can parameterize the equations as follows.
Let x2 = s , x5 = t x1−s+8t=6 x1=6−8t+s
x3−2t=1 x3=1+2t
The final solution is
x1=6−8t+sx2=sx3=1+2tx4=5x5=tExample 4. For what values of a and b does the below system have
a) One solution.
b) Infinitely many solutions.
c) No solutions.
⎩⎨⎧x+y+2z=42x+3y=a−y+4z=b
Lets start off by putting this in an augmented matrix:
12013−1204∣∣∣4abR2=R2−2×R1
10011−12−44∣∣∣4a−8bR3=R3+R2
1001102−40∣∣∣4a−8a+b−8The solution is inconsistent if a and b are non 0 or if a+b=8.
If a+b=8, The matrix becomes
1001102−40∣∣∣4a−80and x3 becomes a free variable. Therefore there are infinitely many values of x3 , and therefore infinite solutions to a and b .
As a result, the system will never have 1 solution.